/*
 * Created on Jul 28, 2005
 *
 */
package com.erclab.internal.xpresso.util;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author Enrique Rodriguez.
 *
 */
public class FileUtility {

	public static String getFileContent(String filepath) throws IOException{
		StringBuffer file = new StringBuffer();
		BufferedReader in = null;
		try {
			in = new BufferedReader(new FileReader(filepath));
			String str;
			while ((str = in.readLine()) != null) {
				file.append(str);
			}
		} catch (IOException e) {
			// TODO: Log and throw
			throw e;
		} finally {
			if (in != null)
				in.close();
		}
		return file.toString();        
	}
}
